home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 82 / 082.d81 / waist control (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  16KB  |  561 lines

  1. 1 y=828:n=53280:ifpeek(49152)<>240thenload"dfont1",8,1
  2. 2 ifpeek(51200)<>240thenload"dfont2",8,1
  3. 3 ifpeek(y)<>24thensys57812"ss 1990",8:poke780,0:poke781,60:poke782,3:sys65493
  4. 4 poken,.:poken+1,.:poken+2,5:poken+3,3:poken+4,7:s=56320:x=1
  5. 5 printchr$(14)"[147][159]    [175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  6. 6 print"[154]     [210]eading [196]isk... [208]lease [215]ait... "
  7. 7 print"    [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]":gosub407:a$=chr$(13)
  8. 8 dimh$(15),c$(26),i$(328),a%(4,50),c%(4,50),e%(4,50),s%(4,328),l%(4),t%(27)
  9. 9 dimp%(328),w$(12),a$(8),b$(8),p$(65),d$(5),e$(5),f$(4),g$(4),j$(6),k$(1)
  10. 10 open2,8,2,"0:dfiles":fory=1to15:input#2,h$(y):next:fory=.to25
  11. 11 input#2,c$(y):next:fory=.to328:input#2,i$(y),p%(y):next
  12. 12 fory=.to8:input#2,a$(y),b$(y):next:fory=.to12:input#2,w$(y):next
  13. 13 fory=1to65:input#2,p$(y):next:close2:fory=.to5:readd$(y),e$(y):next
  14. 14 fory=.to4:readf$(y),g$(y):next:fory=.to27:readt%(y):next
  15. 15 fory=54272to54296:pokey,.:next
  16. 16 fory=.to6:readj$(y):next:fory=.to1:readk$(y):next
  17. 17 fory=54272to54278:readv:pokey,v:next:v=54296
  18. 18 i$(.)="                                       ":p$(.)="                    "
  19. 19 print"[147]"chr$(142):poke56576,peek(56576)and252:poken-8,18
  20. 20 poken-15,peek(n-15)or64:poke648,196:print"[147]":ifpeek(827)<>13thengosub400
  21. 21 gosub464:gosub539
  22. 22 r=4:p=5:gosub271:print"[144][255][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][223]"
  23. 23 fory=.to17:printtab(5)"[188][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][190]":next
  24. 24 gosub271:fory=.to8:printtab(21-(len(a$(y)))/2)""b$(y):next
  25. 25 r=22:p=4:gosub271:print"[144]^cursor / joystick to highlight_"
  26. 26 printtab(4)"[144](   return or fire to engage   )"
  27. 27 te=.:r=5:gosub546:print""a$(te)
  28. 28 gosub272:ifte=5thengosub296:goto28
  29. 29 ifte=6thensys828,1:gosub268:sys831,1:goto28
  30. 30 ifte=8thensys828,1:sp=p:gosub197:p=sp:sys831,1:goto28
  31. 31 ifte=7thensys828,1:gosub406:sys831,1:goto28
  32. 32 a=te:y=l%(a):sys828,1:i=1:x=1:mr=r:mp=p:gosub33:goto28
  33. 33 print"[147]":r=15:p=0:gosub271:form=.to4:print""spc(m)w$(m):next
  34. 34 r=7:p=1:form=5to11:gosub271:r=r+1:ifm=8thenr=r+1
  35. 35 printw$(m):next:gosub67
  36. 36 gosub457:getx$:ifx$=a$thengosub454:gosub45:goto39
  37. 37 ifx$="[145]"thengosub63:goto36
  38. 38 ifx$=""thengosub65:goto36
  39. 39 ifx$="r"thenl%(a)=y:gosub454:sys831,1:r=mr:p=mp:return
  40. 40 ifx$="+"orx$="-"thengosub153:ify=50thenl%(a)=y:sys831,1:r=mr:p=mp:return
  41. 41 ifx$="c"andqthengosub454:gosub152:goto36
  42. 42 ifx$="c"andq=.thengosub454:gosub150
  43. 43 ifx$="t"thengosub454:gosub268
  44. 44 goto36
  45. 45 onxgoto47,48,49,50,51,52,53,54,55,56,57,58,59,60
  46. 46 x$="r":return
  47. 47 i=48:goto62
  48. 48 i=72:goto62
  49. 49 i=94:goto62
  50. 50 i=106:goto62
  51. 51 i=134:goto62
  52. 52 i=184:goto62
  53. 53 i=191:goto62
  54. 54 i=193:goto62
  55. 55 i=196:goto62
  56. 56 i=226:goto62
  57. 57 i=247:goto62
  58. 58 i=265:goto62
  59. 59 i=289:goto62
  60. 60 i=301:goto62
  61. 61 x$="r":return
  62. 62 x=x+1:gosub69:return
  63. 63 ifi=1thengosub453:return
  64. 64 i=i-1:gosub78:gosub70:return
  65. 65 ifi=328thengosub453:return
  66. 66 i=i+1:gosub95:gosub70:return
  67. 67 z$=mid$(a$(a),4,len(a$(a))-4):z$="[144]@"+z$+"[144]\"
  68. 68 r=0:p=0:gosub271:printi$(.):p=(21-(len(a$(a)))/2):gosub271:print""z$
  69. 69 r=1:p=12:gosub271:print"[154]"h$(x)
  70. 70 r=2:p=0:gosub271:printi$(.)"":p=(20-(len(i$(i)))/2):gosub271:printi$(i)
  71. 71 c=x:ifx=12orx=13orx=14thengosub126
  72. 72 r=3:p=8:gosub271:print"[155]    calories per serving":gosub271:printc$(c)
  73. 73 r=4:p=0:gosub271:print"[155]"i$(.)
  74. 74 p=(40-(14+len(p$(p%(i)))))/2:gosub271:print"serving size: "p$(p%(i))
  75. 75 r=5:p=9:gosub271:print"[159]number of servings: "s%(a,i)
  76. 76 ifqthengosub150
  77. 77 return
  78. 78 onxgoto79,80,81,82,83,84,85,86,87,88,89,90,91,92,93
  79. 79 ifi<47thenreturn
  80. 80 ifi>47thenreturn
  81. 81 ifi>71thenreturn
  82. 82 ifi>93thenreturn
  83. 83 ifi>105thenreturn
  84. 84 ifi>133thenreturn
  85. 85 ifi>183thenreturn
  86. 86 ifi>190thenreturn
  87. 87 ifi>192thenreturn
  88. 88 ifi>195thenreturn
  89. 89 ifi>225thenreturn
  90. 90 ifi>246thenreturn
  91. 91 ifi>264thenreturn
  92. 92 ifi>288thenreturn
  93. 93 ifi>300thenreturn
  94. 94 i=i+1:gosub453:return
  95. 95 onxgoto96,98,100,102,104,106,108,110,112,114,116,118,120,122,124
  96. 96 ifi<48thenreturn
  97. 97 goto125
  98. 98 ifi<72thenreturn
  99. 99 goto125
  100. 100 ifi<94thenreturn
  101. 101 goto125
  102. 102 ifi<106thenreturn
  103. 103 goto125
  104. 104 ifi<134thenreturn
  105. 105 goto125
  106. 106 ifi<184thenreturn
  107. 107 goto125
  108. 108 ifi<191thenreturn
  109. 109 goto125
  110. 110 ifi<193thenreturn
  111. 111 goto125
  112. 112 ifi<196thenreturn
  113. 113 goto125
  114. 114 ifi<226thenreturn
  115. 115 goto125
  116. 116 ifi<247thenreturn
  117. 117 goto125
  118. 118 ifi<265thenreturn
  119. 119 goto125
  120. 120 ifi<289thenreturn
  121. 121 goto125
  122. 122 ifi<301thenreturn
  123. 123 goto125
  124. 124 ifi<329thenreturn
  125. 125 i=i-1:gosub453:return
  126. 126 ifx=12thenc=11:return
  127. 127 ifx=14then143
  128. 128 ifi>265andi<276thenc=16:return
  129. 129 ifi<276thenreturn
  130. 130 oni-275goto131,132,133,134,135,136,137,139,132,139,140,141:return
  131. 131 c=17:return
  132. 132 c=18:return
  133. 133 c=19:return
  134. 134 c=20:return
  135. 135 c=21:return
  136. 136 c=22:return
  137. 137 c=23:return
  138. 138 c=24:return
  139. 139 c=1:return
  140. 140 c=14:return
  141. 141 c=25:return
  142. 142 return
  143. 143 ifi<289thenreturn
  144. 144 oni-288goto145,146,147,148,148,147,147,149,147,148,149,147:return
  145. 145 c=22:return
  146. 146 c=.:return
  147. 147 c=16:return
  148. 148 c=1:return
  149. 149 c=13:return
  150. 150 r=16:p=27:gosub271:print"[144]@calories[144]\"
  151. 151 printspc(29)"      [157][157][157][157][157][157]"b:q=1:return
  152. 152 r=16:p=27:gosub271:print"          ":printspc(29)"      ":q=.:return
  153. 153 t=s%(a,i):ifx$="+"thent=t+1:ift=10thent=0
  154. 154 ifx$="-"thent=t-1:ift=-1thent=9
  155. 155 gosub454:ift=s%(a,i)thenreturn
  156. 156 ifs%(a,i)=.then158
  157. 157 goto161
  158. 158 ifx=12thend=d+t
  159. 159 a%(a,y)=i:e%(a,y)=t:c%(a,y)=val(c$(c)):b=b+(t*c%(a,y)):gosub438:s%(a,i)=t
  160. 160 gosub75:y=y+1:return
  161. 161 forw=.to24:ifa%(a,w)=itheng=w
  162. 162 next
  163. 163 ift=.then167
  164. 164 ift<s%(a,i)then170
  165. 165 h=t-s%(a,i):s%(a,i)=t:e%(a,g)=t:b=b+(h*c%(a,g)):gosub438:ifx=12thend=d+h
  166. 166 gosub75:return
  167. 167 b=b-(s%(a,i)*c%(a,g)):s%(a,i)=.:gosub75:ifx=12thend=d-e%(a,g)
  168. 168 forh=gto24:c%(a,h)=c%(a,h+1):e%(a,h)=e%(a,h+1):a%(a,h)=a%(a,h+1):next
  169. 169 y=y-1:return
  170. 170 h=s%(a,i)-t:s%(a,i)=t:e%(a,g)=t:b=b-(h*c%(a,g)):ifx=12thend=d-h
  171. 171 gosub75:return
  172. 172 gosub395:ifx$="n"thenreturn
  173. 173 p=3:gosub271:print"[144]@clearing memory...please wait...\":b=.:d=.
  174. 174 fore=.to4:ifl%(e)=.then177
  175. 175 l%(e)=.:forz=.to25:a%(e,z)=.:c%(e,z)=.:e%(e,z)=.:next
  176. 176 forz=.to328:s%(e,z)=.:next
  177. 177 next:return
  178. 178 ifl%(a)=.thenp=6:gosub271:print"[158]@[153]that meal is not in memory[158]\"
  179. 179 z=l%(a)-1:z1=.:ifl%(a)=.thengosub543:return
  180. 180 z$=mid$(a$(a),4,len(a$(a))-4):z$="[144]@"+z$+"[144]\"
  181. 181 print"[147][144]"tab(21-(len(z$))/2)z$""
  182. 182 jj=.:fore=z1toz1+9:ifa%(a,e)=.thene=z1+9:jj=1:goto184
  183. 183 gosub191
  184. 184 next:ifjjora%(a,e)=.thengosub189
  185. 185 printtab(2)"[144]"w$(12)
  186. 186 gosub350
  187. 187 ifjjora%(a,e)=.thenreturn
  188. 188 z1=e:goto181
  189. 189 k=.:fore=.toz:k=k+(c%(a,e)*e%(a,e)):next
  190. 190 print"[158]      calories for this meal:"k:return
  191. 191 gosub440
  192. 192 print"[157]"e%(a,e);:ife%(a,e)=1thenprint"serving";:goto194
  193. 193 print"servings";
  194. 194 ifp%(a%(a,e))=55thenprint:goto196
  195. 195 print" of "p$(p%(a%(a,e)))" each"
  196. 196 return
  197. 197 p=6:gosub271:print"[158]@[144]choose new person   [y/n]?[158]\":gosub556
  198. 198 ifx$="y"then21
  199. 199 gosub271:print"[158]@[144]return to loadstar  [y/n]?[158]\"
  200. 200 getx$:ifx$<>"y"andx$<>"n"then200
  201. 201 gosub454:ifx$="n"thenreturn
  202. 202 print"[147]":fory=54272to54296:pokey,.:next
  203. 203 poke56576,199:poke53280-8,21:poke53280-15,27:poke648,4
  204. 204 printchr$(142)"[147][159]booting loadstar...[144]"
  205. 205 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  206. 206 ifer<>63thenprint"[159]not found!":end
  207. 207 print"load"chr$(34)"hello connect"chr$(34)",8"
  208. 208 poke631,131:poke198,1:end
  209. 209 print"[147]        [144]@i n f o r m a t i o n[144]\"
  210. 210 print"[155]   it's good to eat food high in fiber,"
  211. 211 print"low in sodium, cholesterol, saturated"
  212. 212 print"fat, or added sugar.  bake, roast, boil,";
  213. 213 print"grill, or broil food.  use nonstick"
  214. 214 print"spray/pans to brown or fry food."
  215. 215 print